package work.work70;

/**
 * 玩家
 */
public class Role {
    public void getRobber(Robber robber){
        robber.selflntroduce();
        robber.rob();
        robber.attack();
    }
    public void getHunter(Hunter hunter){
        hunter.selflntroduce();
        hunter.hunt();
        hunter.attack();
    }
    public void getDoctor(Doctor doctor){
        doctor.selflntroduce();
        doctor.treat();
    }
    public void getFarmer(Farmer farmer){
        farmer.selflntroduce();
        farmer.attack();
        farmer.mine();
        farmer.treat();
    }
    public void getSoldier(Soldier soldier){
        soldier.selflntroduce();
        soldier.defenf();
    }
    public static void main(String[] args) {
        Role role = new Role();
        role.getRobber(new Robber("盗贼",10));
        role.getHunter(new Hunter("猎人",20));
        role.getDoctor(new Doctor("医生",30));
        role.getFarmer(new Farmer("农民",40));
        role.getSoldier(new Soldier("士兵",50));
    }
}
